package com.qf.controller;

import com.qf.pojo.Student;
import com.qf.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @Description: 公用常量
 * @Data: 2022/9/5 20:46
 * @Pacakge: com.qf.controller
 * @ClassName: StudentController
 * @Author: fan
 */
@Controller
@RequestMapping("student")
public class StudentController {
    @PostMapping("studentInfo")
    public String studentInfo(Student student){
        System.out.println("student = " + student);
        return "success";
    }
    @RequestMapping("getStudent")
    public String getStudent(@RequestParam("name") String username,@RequestParam("pd") String password){
        System.out.println("username = " + username);
        System.out.println("password = " + password);
        return "success";
    }
    @PostMapping("findStudent")
    public String findStudent(@RequestBody String student){
        System.out.println("student = " + student);
        return "success";
    }
    @RequestMapping("updateStudent/{id}")
    public String updateStudent(@PathVariable("id")int id){
        System.out.println("id= " + id);
        return "success";
    }
}
